/*
  Button

  Turns on and off a light emitting diode(LED) connected to digital pin 13,
  when pressing a pushbutton attached to pin 2.

  The circuit:
  - LED attached from pin 13 to ground
  - pushbutton attached to pin 2 from +5V
  - 10K resistor attached to pin 2 from ground

  - Note: on most Arduinos there is already an LED on the board
    attached to pin 13.

  created 2005
  by DojoDave <http://www.0j0.org>
  modified 30 Aug 2011
  by Tom Igoe

  This example code is in the public domain.

  http://www.arduino.cc/en/Tutorial/Button
*/

// constants won't change. They're used here to set pin numbers:
// button pins
#define key0 D0 //  key0
#define key1 D6 //  key1

// variables will change:
int key0_state = 0;         // variable for reading the pushbutton status
int key1_state = 0;

void setup() {
    Serial.begin(115200);
  // initialize the LED pin as an output:
  pinMode(LED_BUILTIN, OUTPUT);     // Initialize the LED_BUILTIN pin as an output
  // initialize the pushbutton pin as an input:
  pinMode(key0, INPUT);
  pinMode(key1, INPUT);
}

void loop() {
  // read the state of the pushbutton value:
//  buttonState = digitalRead(buttonPin);
  key0_state = digitalRead(key0);
  key1_state = digitalRead(key1);
  Serial.println(key0_state);
  Serial.println(key1_state);
  Serial.println();
  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (key0_state == HIGH || key1_state == HIGH) {
    // turn LED on:
    digitalWrite(LED_BUILTIN, LOW);
  }else{
    digitalWrite(LED_BUILTIN, HIGH);
  }
  delay(1);
//  if() {
//    // turn LED off:
//    digitalWrite(LED_BUILTIN, HIGH);
//  }
}
